package com.woniu.common.pojo;
import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;


import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Document(indexName = "order" , shards = 1 , replicas = 1)
public class Order implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Field(type = FieldType.Text)
    private String oid;
    @Field(type = FieldType.Text)
    private User user;
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private Shops shops;
    @Field(type = FieldType.Text)
    private Flower flower;
    @Field(type = FieldType.Date)
    private Date createTime;
    @Field(type = FieldType.Integer)
    private Integer state;
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String address;
    @Field(type = FieldType.Text)
    private Integer quantity;
    @Field(type = FieldType.Double)
    private Double oprice;
    @Field(type = FieldType.Text)
    private String appraise;
    @Field(type = FieldType.Text)
    private String comment;
    @Field(type = FieldType.Text)
    private String points;





}